import request from "@/utils/request";

//列表
export function getProductList(query) {
  return request({
    url: "/system/order/product/list",
    method: "get",
    params: query,
  });
}

//新增
export function addchargeback(data) {
  return request({
    url: "/system/order/chargeback/rule",
    method: "post",
    data: data,
  });
}
//修改
export function updatechargeback(data) {
  return request({
    url: "/system/order/chargeback/rule",
    method: "put",
    data: data,
  });
}
//立即支付
export function immediatePayment(data) {
  return request({
    url: "/system/order/product/payProductPc",
    method: "post",
    data: data,
  });
}
//稍后支付
export function laterPayment(data) {
  return request({
    url: "/system/order/product/addProductOrder",
    method: "post",
    data: data,
  });
}
//技师列表
export function getTechnicians(query) {
  return request({
    url: "/system/technician/list",
    method: "get",
    params: query,
  });
}
//删除
export function deleteProduct(id) {
  return request({
    url: `/system/order/product/${id}`,
    method: "delete",
  });
}
//退款
export function productRefundt(data) {
  return request({
    url: "/system/order/product/productRefund",
    method: "post",
    data,
  });
}
//修改
export function updateEarningsByOrderId(data) {
  return request({
    url: "/system/technician/earnings/updateEarningsByOrderId",
    method: "post",
    data,
  });
}
//附加商品订单修改
export function product(id) {
  return request({
    url: "/system/order/product/" + id,
    method: "get",
  });
}
